package com.itheima.objectstream;

import com.itheima.domain.Student;

import java.io.FileOutputStream;
import java.io.ObjectOutputStream;

/*
序列化
 */
public class Demo01 {

    public static void main(String[] args)  throws Exception{
     //创建对象
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("day13\\g.txt"));
        //调用方法
     oos.writeObject(new Student("kunkun",26,"淖马村","kunkun520"));
     //释放资源
        oos.close();
    }
}
